package com.billManage.system.service.impl;

import java.util.List;
import com.billManage.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.billManage.system.mapper.SysBillApplyRecordMapper;
import com.billManage.system.domain.SysBillApplyRecord;
import com.billManage.system.service.ISysBillApplyRecordService;
import com.billManage.common.core.text.Convert;

/**
 * 票据报销审核记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-20
 */
@Service
public class SysBillApplyRecordServiceImpl implements ISysBillApplyRecordService 
{
    @Autowired
    private SysBillApplyRecordMapper sysBillApplyRecordMapper;

    /**
     * 查询票据报销审核记录
     * 
     * @param billApplyRecordId 票据报销审核记录主键
     * @return 票据报销审核记录
     */
    @Override
    public SysBillApplyRecord selectSysBillApplyRecordByBillApplyRecordId(Long billApplyRecordId)
    {
        return sysBillApplyRecordMapper.selectSysBillApplyRecordByBillApplyRecordId(billApplyRecordId);
    }

    /**
     * 查询票据报销审核记录列表
     * 
     * @param sysBillApplyRecord 票据报销审核记录
     * @return 票据报销审核记录
     */
    @Override
    public List<SysBillApplyRecord> selectSysBillApplyRecordList(SysBillApplyRecord sysBillApplyRecord)
    {
        return sysBillApplyRecordMapper.selectSysBillApplyRecordList(sysBillApplyRecord);
    }

    /**
     * 新增票据报销审核记录
     * 
     * @param sysBillApplyRecord 票据报销审核记录
     * @return 结果
     */
    @Override
    public int insertSysBillApplyRecord(SysBillApplyRecord sysBillApplyRecord)
    {
        sysBillApplyRecord.setCreateTime(DateUtils.getNowDate());
        return sysBillApplyRecordMapper.insertSysBillApplyRecord(sysBillApplyRecord);
    }

    /**
     * 修改票据报销审核记录
     * 
     * @param sysBillApplyRecord 票据报销审核记录
     * @return 结果
     */
    @Override
    public int updateSysBillApplyRecord(SysBillApplyRecord sysBillApplyRecord)
    {
        sysBillApplyRecord.setUpdateTime(DateUtils.getNowDate());
        return sysBillApplyRecordMapper.updateSysBillApplyRecord(sysBillApplyRecord);
    }

    /**
     * 批量删除票据报销审核记录
     * 
     * @param billApplyRecordIds 需要删除的票据报销审核记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBillApplyRecordByBillApplyRecordIds(String billApplyRecordIds)
    {
        return sysBillApplyRecordMapper.deleteSysBillApplyRecordByBillApplyRecordIds(Convert.toStrArray(billApplyRecordIds));
    }

    /**
     * 删除票据报销审核记录信息
     * 
     * @param billApplyRecordId 票据报销审核记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBillApplyRecordByBillApplyRecordId(Long billApplyRecordId)
    {
        return sysBillApplyRecordMapper.deleteSysBillApplyRecordByBillApplyRecordId(billApplyRecordId);
    }
}
